//
//  OnExten.h
//  Jyxt
//
//  Created by 刘日 on 17/5/18.
//  Copyright © 2017年 DaLian Rental Housing Management. All rights reserved.
//

#import "MixExten.h"

@interface OnExten : MixExten

/**
 加载成功的回调函数

 @param mixView 加载成功的mixView
 */
typedef void(^ LM_MIX_ON_LOAD_COMPLETE)(LemonMixView *mixView);
/**
 加载进度改变的回调block

 
 @param mixView 进度改变的mixView
 @param progress 当前的进度
 */
typedef void(^ LM_MIX_ON_LOAD_PROGRESS_CHANGE)(LemonMixView *mixView , double progress);

/**
 收到JS端发送的消息的回调函数

 @param mixView 当前mixView
 @param msg 收到的消息
 */
typedef void(^ LM_MIX_ON_RECEIVE_JS_MSG)(LemonMixView *mixView, NSDictionary *msg);

/**
 加载成功的回调存储池
 */
@property (nonatomic , strong)NSMutableArray<LM_MIX_ON_LOAD_COMPLETE> *onLoadCompleteArr;
/**
 加载进度改变的监听回调存储池
 */
@property (nonatomic , strong)NSMutableArray<LM_MIX_ON_LOAD_PROGRESS_CHANGE> *onProgressChangeArr;

/**
 收到JS消息的监听回调存储池
 */
@property (nonatomic , strong)NSMutableArray<LM_MIX_ON_RECEIVE_JS_MSG> *onReceiveJSMsgArr;

- (void)addOnLoadCompleteCallback: (LM_MIX_ON_LOAD_COMPLETE)loadComplete;

- (void)removeOnLoadCompleteCallback: (LM_MIX_ON_LOAD_COMPLETE)loadComplete;

- (void)addOnLoadProgressChangeCallback: (LM_MIX_ON_LOAD_PROGRESS_CHANGE)progressChange;

- (void)removeOnLoadProgressChangeCallback: (LM_MIX_ON_LOAD_PROGRESS_CHANGE)progressChange;

- (void)addOnReceiveJSMsgCallback: (LM_MIX_ON_RECEIVE_JS_MSG)jsMsg;

- (void)removeOnReceiveJSMsgCallback: (LM_MIX_ON_RECEIVE_JS_MSG)jsMsg;

@end
